5.5
MEDIUM CVSS 3.1
CVE-2021-47396
mac80211-hwsim: fix late beacon hrtimer handling
Description

In the Linux kernel, the following vulnerability has been resolved: mac80211-hwsim: fix late beacon hrtimer handling Thomas explained in https://lore.kernel.org/r/87mtoeb4hb.ffs@tglx that our handling of the hrtimer here is wrong: If the timer fires late (e.g. due to vCPU scheduling, as reported by Dmitry/syzbot) then it tries to actually rearm the timer at the next deadline, which might be in the past already: 1 2 3 N N+1 | | | ... | | ^ intended to fire here (1) ^ next deadline here (2) ^ actually fired here The next time it fires, it's later, but will still try to schedule for the next deadline (now 3), etc. until it catches up with N, but that might take a long time, causing stalls etc. Now, all of this is simulation, so we just have to fix it, but note that the behaviour is wrong even per spec, since there's no value then in sending all those beacons unaligned - they should be aligned to the TBTT (1, 2, 3, ... in the picture), and if we're a bit (or a lot) late, then just resume at that point. Therefore, change the code to use hrtimer_forward_now() which will ensure that the next firing of the timer would be at N+1 (in the picture), i.e. the next interval point after the current time.

INFO

Published Date :

May 21, 2024, 3:15 p.m.

Last Modified :

Sept. 25, 2025, 3:36 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2021-47396 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM [email protected]
Solution
Update the Linux packages to address a kernel HRTimer desynchronization vulnerability.
  • Update the affected Linux packages.
  • Reboot the system if required.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-47396 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2021-47396 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-47396 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-47396 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Sep. 25, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
    Added CWE NVD-CWE-noinfo
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:5.15:rc2:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.15:rc3:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:5.15:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.14.10 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (excluding) 5.10.71 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 3.9 up to (excluding) 5.4.151
    Added Reference Type CVE: https://git.kernel.org/stable/c/2c204cf594df3b9468368dc9d0b24d482d93cda7 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/2c204cf594df3b9468368dc9d0b24d482d93cda7 Types: Patch
    Added Reference Type CVE: https://git.kernel.org/stable/c/313bbd1990b6ddfdaa7da098d0c56b098a833572 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/313bbd1990b6ddfdaa7da098d0c56b098a833572 Types: Patch
    Added Reference Type CVE: https://git.kernel.org/stable/c/9bee85de2c8155388c09a2e1530a243ec1c96f05 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/9bee85de2c8155388c09a2e1530a243ec1c96f05 Types: Patch
    Added Reference Type CVE: https://git.kernel.org/stable/c/ed2adf69e29848d1eb9df99633dde655421c92ed Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/ed2adf69e29848d1eb9df99633dde655421c92ed Types: Patch
  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://git.kernel.org/stable/c/2c204cf594df3b9468368dc9d0b24d482d93cda7
    Added Reference https://git.kernel.org/stable/c/313bbd1990b6ddfdaa7da098d0c56b098a833572
    Added Reference https://git.kernel.org/stable/c/9bee85de2c8155388c09a2e1530a243ec1c96f05
    Added Reference https://git.kernel.org/stable/c/ed2adf69e29848d1eb9df99633dde655421c92ed
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 28, 2024

    Action Type Old Value New Value
  • CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    May. 21, 2024

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: mac80211-hwsim: fix late beacon hrtimer handling Thomas explained in https://lore.kernel.org/r/87mtoeb4hb.ffs@tglx that our handling of the hrtimer here is wrong: If the timer fires late (e.g. due to vCPU scheduling, as reported by Dmitry/syzbot) then it tries to actually rearm the timer at the next deadline, which might be in the past already: 1 2 3 N N+1 | | | ... | | ^ intended to fire here (1) ^ next deadline here (2) ^ actually fired here The next time it fires, it's later, but will still try to schedule for the next deadline (now 3), etc. until it catches up with N, but that might take a long time, causing stalls etc. Now, all of this is simulation, so we just have to fix it, but note that the behaviour is wrong even per spec, since there's no value then in sending all those beacons unaligned - they should be aligned to the TBTT (1, 2, 3, ... in the picture), and if we're a bit (or a lot) late, then just resume at that point. Therefore, change the code to use hrtimer_forward_now() which will ensure that the next firing of the timer would be at N+1 (in the picture), i.e. the next interval point after the current time.
    Added Reference kernel.org https://git.kernel.org/stable/c/9bee85de2c8155388c09a2e1530a243ec1c96f05 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/2c204cf594df3b9468368dc9d0b24d482d93cda7 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/ed2adf69e29848d1eb9df99633dde655421c92ed [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/313bbd1990b6ddfdaa7da098d0c56b098a833572 [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 5.5
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact